<?php


namespace app\admin\controller;
use think\Db;
use think\Request;
use think\Controller;
class Exachievement extends ApiCommon
{
   public function ExachievementWrite()
    {
        $newsModel=model('Exachievement');
        $param=$this->param;
        $data=$newsModel->WriteExachievement($param);
        if(!$data)
        {
            return resultArray(['error'=>'添加数据失败']);
        }
        return resultArray(['data'=>'添加数据成功']);
    }   

    public function ExachievementList()
    {
        $newsModel=model('Exachievement');
        $param=$this->param;
        $data=$newsModel->ListExachievement($param);
        return resultArray(['data'=> $data]);
    }   
    public function ExachievementRevise()
    {
        $newsModel=model('Exachievement');
        $param=$this->param;
        $data=$newsModel->ReviseExachievement($param);
        if(!$data)
        {
            return resultArray(['error'=>'修改数据失败']);
        }
        return resultArray(['data'=>'修改数据成功']);
    }
     public function ExachievementDelete()
    {
        $newsModel=model('Exachievement');
        $param=$this->param;
        $data=$newsModel->DeleteExachievement($param);
        if(!$data)
        {
            return resultArray(['error'=>'删除数据失败']);
        }
        return resultArray(['data'=>'删除数据成功']);
    }
}
